<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2006-2016 the original author or authors.

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.

-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Migrating from Abator</title>
    <link rel="stylesheet" type="text/css" href="mbgstyle.css"/>
</head>
<body>
<h1>Migrating from Abator</h1>
<p>This page details changes between MyBatis Generator (MBG)
    and Abator. For most users, the changes should be simple.
    If you extended any of Abator's classes to supply custom implementations
    of code generators or the Java type resolver, you will need to rework
    those custom classes.</p>
<p>The changes are listed in three categories: from required
    configuration changes to less common changes. Note that most changes
    are described assuming you are using XML configuration for MBG. If you
    are using Java based configuration, then the changes are still required
    and should be easy to deduce from the description of the XML changes.</p>
<h2>Required for All Users</h2>
<ul>
    <li>The DTD has changed. The new DOCTYPE should be
      <pre>

&lt;!DOCTYPE generatorConfiguration
  PUBLIC &quot;-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN&quot;
  &quot;http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd&quot;&gt;
    </pre>
    </li>
    <li>The <code>&lt;abatorConfiguration&gt;</code> element is renamed to
        <code>&lt;generatorConfiguration&gt;</code></li>
    <li>The <code>&lt;abatorContext&gt;</code> element is renamed to
        <code>&lt;context&gt;</code></li>
    <li>The <code>&lt;daoGenerator&gt;</code> element is renamed to
        <code>&lt;javaClientGenerator&gt;</code></li>
</ul>
<h2>Required for Many Users</h2>
<ul>
    <li>MyBatis3 is now the default target runtime.</li>
    <li><code>&lt;context&gt;</code> element now requires an ID</li>
    <li>The <code>generatorSet</code> attribute is removed from the
        <code>&lt;context&gt;</code> element and replaced with the
        <code>targetRuntime</code> attribute. Valid values for this
        attribute are <code>Ibatis2Java2</code>, <code>Ibatis2Java5</code>,
        or <code>MyBatis3</code>.
        MBG does not include the legacy generator set from
        Abator - so iBATIS version 2.2.0 or higher is required for
        the code generated by MyBatis Generator.
    </li>
    <li>The MBG classloading strategy has changed substantially, and we now recommend that
        you manage the runtime classpath external to MBG. If you manage the classpath with
        configuration entries, you must make the
        following changes from Abator:
        <ul>
            <li>Class path entries are specified at the configuration file level
                with the <a href="configreference/classPathEntry.html">&lt;classPathEntry&gt;</a>
                element - now a child element of <code>&lt;generatorConfiguration&gt;</code> only.
            </li>
            <li>A <code>&lt;classPathEntry&gt;</code> element is not longer allowed as a child
                of <code>&lt;jdbcConnection&gt;</code></li>
            <li>The "rootClasspath" property is no longer valid for the <code>&lt;javaModelGenerator&gt;</code>
                element.
            </li>
        </ul>
    </li>
</ul>
<h2>Rarely Required Changes</h2>
<ul>
    <li>The <code>type</code> attribute is removed from both the
        <code>&lt;javaModelGenerator&gt;</code> and
        <code>&lt;sqlMapGenerator&gt;</code> elements. MBG has an entirely
        different method of supplying custom code generators than Abator.
        See the <a href="reference/extending.html">Extending MyBatis Generator</a>
        page for full details.
    </li>
    <li>The <code>JavaTypeResolver</code> interface has changed and is
        simplified. If you specified a custom implementation on the
        <code>&lt;javaTypeResolver&gt;</code> element, you must rework your implementation
        class.
    </li>
    <li>The <code>ProgressCallback</code> interface has changed significantly. If you implemented
        this interface for some other execution environment, you will need to rework your implementation.
    </li>
</ul>
</body>
</html>